---
title: Pull Secrets
sidebar_label: pullSecrets
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import ConfigPartialPullSecrets from '../_partials/v2beta1/pullSecrets.mdx'

DevSpace allows you to configure additional [pull secrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) that should be created in the target namespace. For each configured pull secret in the `devspace.yaml`, DevSpace will create a secret in the target namespace and add the secret to the `imagePullSecrets` field of the service account.

For [images](../images/README.mdx), DevSpace will also automatically create a pull secret, if authentication data can be found in the local docker store and creation is [enabled](../images/README.mdx#8-create-pull-secrets) via `createPullSecret`. 

Image Pull Secrets are defined in the `pullSecrets` section of the `devspace.yaml`.

<Tabs
    defaultValue="password"
    values={[
        { label: 'With Password', value: 'password', },
        { label: 'From Docker', value: 'docker', },
        { label: 'Custom Secret & Service Account', value: 'custom', },
    ]
    }>
<TabItem value="password">

```yaml
# If you don't want to specify the password and username directly in the config
# you can use variables, .env file or save the credentials in the local docker store
pullSecrets:
  my-pullsecret:
    registry: my-registry.com:5000
    username: ${REGISTRY_USER}
    password: ${REGISTRY_PASSWORD}
```

</TabItem>
<TabItem value="docker">

```yaml
# If you leave out the username & password DevSpace will try
# to get these from the local docker store. Make sure you
# are logged into the registry with `docker login my-registry.com:5000`
pullSecrets:
  my-pullsecret:
    registry: my-registry.com:5000
```

</TabItem>
<TabItem value="custom">

```yaml
pullSecrets:
  my-pullsecret:
    registry: my-registry.com:5000
    secret: my-pull-secret-name
    serviceAccounts:
      - default
      - my-other-service-account
```

</TabItem>
</Tabs>

## Configuration

<ConfigPartialPullSecrets/>
